<!--
 * @Author: zhangfan
 * @Date: 2024-06-25 18:36:08
 * @LastEditors: ***
 * @LastEditTime: 2024-06-26 13:44:06
 * @Description: 11
 * @FilePath: /demo/src/views/slots/components/child-one.vue
-->
<script>
export default {
  props: {
    tableData: {
      type: Array,
      default () {
        return []
      }
    }
  },
  data () {
    return {
    }
  },
  mounted () {
    console.log('this.$slots==', this.$slots) // { default:[VNode, VNode], footer: '', header:'' }
    console.log('this.$slots.default==', this.$slots.default) // undefind
  },
  render (h, vm) {
    return (
      <ul>
        {
          this.tableData.map(item => (
            <li>{this.$slots.default || item.name}</li>
            // <li>{this.$slots.header || item.name}</li>
          ))
        }
      </ul>
    )
  }
}
</script>
<style scoped>
.view-contain-one {
  height: 300px;
  width: 500px;
  border: 1px solid #ccc;
}
</style>
